#!/bin/sh

echo "starting nsqlookupd..."
nohup /opt/nsqlookupd.sh > /opt/nsqlookupd.log 2>&1 &
sleep 2

echo "starting nsqd..."
nohup /opt/nsqd.sh       > /opt/nsqd.log       2>&1 &
sleep 2

echo "starting producer..."
nohup /opt/producer      > /opt/producer.log   2>&1 &
sleep 2

echo "starting consumer..."
sh -c /opt/consumer
